import { createApp } from 'vue'
import './style.css'
import App from './App.vue'
import { setupRouter } from '@/router';

// 通用字体
import 'vfonts/Lato.css'
// 等宽字体
import 'vfonts/FiraCode.css'

import { createPinia } from 'pinia'

import "tailwindcss/tailwind.css"



// 实例化 Pinia
const pinia = createPinia()


import axios from "axios";
import { mockXHR } from "@/mock/index";

/**
 * 测试环境下 引入自定义的mockRequest
 * 因为mockRequest不是默认导出的：export default{}
 * 所以引入时需要加大括号，这种可以引入多个
 */
if (process.env.NODE_ENV === 'development') {
  mockXHR();
}

const app = createApp(App)
// 创建路由
setupRouter(app);
app.use(pinia)
app.provide("$axios", axios).mount("#app");

